package com.liuyu.common.framework.iinsure;

import cn.hutool.core.io.FileUtil;
import cn.hutool.extra.mail.MailUtil;

import java.io.File;

/**
 * 1
 * @author: liuyu
 * @date: 2021/9/10 13:07
 * @version:
 */
@SuppressWarnings("all")
public class MailTest {
    public static void main(String[] args) {
//        MailAccount account = new MailAccount();
//        account.setHost("smtp.qq.com");
//        account.setPort(465);
//        account.setAuth(true);
//        account.setSslEnable(true);
//        account.setFrom("layyu1@qq.com");
//        account.setUser("529354326@qq.com");
//        account.setPass("zisafaoatoohcabd");
        try {
            File file = FileUtil.file("E:\\2021市民保\\微保\\已续保清单.xls20210910T102722.xlsx");
            MailUtil.send("layyu1@qq.com", "批量邮件的标题", "邮件的内容", false, file);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
